package graphics;

import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

import state.State;
import tool.ImageUtils;
import tool.ScreenUtils;
import boot.Boot;

public class Background {

	public void repaint(Graphics graphics) {
		boolean isBlurry = Boot.state().equals(State.SEARCH_CHOICE);
		if (isBlurry) {
			ScreenUtils.setBlackBackground(graphics);
		} else {
			drawImage(graphics);
		}
	}

	private void drawImage(Graphics graphics) {

		Image image = ImageUtils.getImageFromImageFolder("/Earth.png");
		graphics.drawImage(image, 0, 0, Graphics.LEFT | Graphics.TOP);

		/*
		 * if (Boot.state().equals(State.PLAY_MP3)) { Image image = null; if
		 * (Boot.state().equals(State.GOLDEN_TUNE)) { image =
		 * ImageUtils.getImageFromImageFolder("/Gold.png"); } else { image =
		 * ImageUtils.getImageFromImageFolder("/Active.gif"); }
		 * graphics.drawImage(image, 0, 0, Graphics.LEFT | Graphics.TOP); } else {
		 * Image image = ImageUtils .getImageFromImageFolder("/Passive.gif");
		 * graphics.drawImage(image, 0, 0, Graphics.LEFT | Graphics.TOP); }
		 */
	}
}
